﻿<Window x:Class="PrestoDashboard.Windows.RoleSelectorView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
        xmlns:galaSoft="clr-namespace:GalaSoft.MvvmLight.Command;assembly=GalaSoft.MvvmLight.Extras.WPF4"
        WindowStartupLocation="CenterScreen"
        Background="#FF595959"
        ResizeMode="NoResize"
        Title="RoleSelectorView" Height="300" Width="300">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
            <RowDefinition Height="40"/>
        </Grid.RowDefinitions>
        <ListBox Grid.Row="0" ItemsSource="{Binding Roles}" 
                     SelectedItem="{Binding SelectedRole}" Height="auto">
            <i:Interaction.Triggers>
                <i:EventTrigger EventName="MouseDoubleClick">
                    <galaSoft:EventToCommand Command="{Binding OkCommand, Mode=OneWay}"/>
                </i:EventTrigger>
            </i:Interaction.Triggers>
        </ListBox>
        <StackPanel Orientation="Horizontal" Grid.Row="1" HorizontalAlignment="Center" Height="35">
            <Button Command="{Binding OkCommand}" Style="{StaticResource StandardButton}" Content="OK" Margin="5" />
            <Button Command="{Binding CancelCommand}" Style="{StaticResource StandardButton}" Content="Cancel" Margin="5" />
        </StackPanel>
    </Grid>
</Window>
